package com.ctsi.security.domain;



public class DataObject implements java.io.Serializable{
	private static final long serialVersionUID = 6490843756197705601L;
	private String id;
	private String dataObjectId;
	private String dataObjectName;
	private String description;
	private String dataObjectTypeId;
	private String parent; 
	private String dataObjectTypeName; 
	private Long orderNo;
    
	/**
	 * wangbf add on 2011-10-13
	 * 控制数据对象的数据对象（系统数据对象）
	 */
	private String sysDataObjectid;
	
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (!(obj instanceof DataObject) || id == null)
			return false;
		return id.equals(((DataObject)obj).id);
	}

	public int hashCode() {
		return id == null ? super.hashCode() : id.hashCode();
	}

	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getDataObjectId() {
		return dataObjectId;
	}
	public void setDataObjectId(String dataObjectId) {
		this.dataObjectId = dataObjectId;
	}
	public String getDataObjectName() {
		return dataObjectName;
	}
	public void setDataObjectName(String dataObjectName) {
		this.dataObjectName = dataObjectName;
	}
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	public String getDataObjectTypeId() {
		return dataObjectTypeId;
	}
	public void setDataObjectTypeId(String dataObjectTypeId) {
		this.dataObjectTypeId = dataObjectTypeId;
	}
	public String toString()
	{
		if (dataObjectName!=null)
			return dataObjectName;
		return super.toString();
	}

	public String getParent() {
		return parent;
	}

	public void setParent(String parent) {
		this.parent = parent;
	}

	public Long getOrderNo() {
		if(orderNo==null){
			return System.currentTimeMillis();
		}
		return orderNo;
	}

	public void setOrderNo(Long orderNo) {
		this.orderNo = orderNo;
	}

	public String getDataObjectTypeName() {
		return dataObjectTypeName;
	}

	public void setDataObjectTypeName(String dataObjectTypeName) {
		this.dataObjectTypeName = dataObjectTypeName;
	}

	public String getSysDataObjectid() {
		return sysDataObjectid;
	}

	public void setSysDataObjectid(String sysDataObjectid) {
		this.sysDataObjectid = sysDataObjectid;
	}
}
